﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GetPass.aspx.cs" Inherits="Com.CMS263.Web.manage.ManageUser.GetPass" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
     <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <link href="../common/validator.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="../../js/common.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function ok() {
        var flag=false;
            if($("#email").val()=="")
            {
                $("#emailSpan").html("必填");
                $("#email").focus();
                return false;
            }else if($("#email").val().indexOf("@")==-1 || $("#email").val().indexOf(".")==-1)
            {
                $("#emailSpan").html("邮箱格式不正确！");
            }
            else
            {
                $("#emailSpan").html("");
                flag = true;
            }
            if(flag){
                $("#StateSpan").html("");               
             $.post("User_action.aspx?op=getPass", { email: $("#email").val() }, function(data) {
                if(data==1)
                {
                     $("#email").val("");
                     $("#StateSpan").html("更改密码的网址已发送到您的邮箱, <a href=\"/Account/Account/Login\">请检查!</a>")
                }else{
                    $("#StateSpan").html("<font color=red>邮箱错误!</font>")
                }
             })
           }
        }
</script>
</head>
<body>
    <form id="form1" runat="server">
 <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_1">
            <tr>
                <td height="23" class="table_2" colspan="2">
                    用户管理
                </td>
            </tr>
            <tr>
          <td class="tdside" colspan="2">
             找回密码</td>
              </tr>
               <tr>
          <td class="tdside" colspan="2">
              <center><b><font color="#666666">请输入您的登录使用电子邮件接收更改密码的网址 </font></b></center>
              </td></tr>
            <tr>
                 <td class="tdside" style=" width:100px; text-align:center;">
                  
                     邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 箱:</td><td class="tdside"><input id="email"  type="text" name="email"/><span style="color:red" id="emailSpan"></span></td>
            </tr>        
             <tr>            
            <td   colspan="2"><span id="StateSpan"></span></td>
            </tr>  
                     <tr><td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <input ID="Button1"  value="提 交" type="button" onclick="ok();"/>
                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="取消" id="cancel"  style="width:50px" /></td></tr>
        </table>
    </form>
</body>
</html>
